widget-factory: Revamp transition effects
authorMatthias Clasen <mclasen@redhat.com>
Mon, 27 Apr 2020 02:30:34 +0000 (22:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 27 Apr 2020 02:30:34 +0000 (22:30 -0400)
Use a quick crossfade for the main pages, and use
the rotation for the small stack on page 2, where
it looks less out of place.

demos/widget-factory/widget-factory.c
demos/widget-factory/widget-factory.ui

index bf84199dc78d47b9de653073510a90f6b37f240e..b3ec8be1ad2b73dabd34fba11f386f3958c80ba7 100644 (file)
@@ -99,7 +99,7 @@ change_transition_state (GSimpleAction *action,
   GtkStackTransitionType transition;
 
   if (g_variant_get_boolean (state))
-    transition = GTK_STACK_TRANSITION_TYPE_ROTATE_LEFT_RIGHT;
+    transition = GTK_STACK_TRANSITION_TYPE_CROSSFADE;
   else
     transition = GTK_STACK_TRANSITION_TYPE_NONE;
 
index 03b175a8620a7e8022a744668bce338116b3f0c0..c71564248d6f9d38909fa31d67fb85d88189896d 100644 (file)
@@ -37,7 +37,7 @@
         </section>
       </submenu> 
       <item>
-        <attribute name="label" translatable="yes">Slide Pages</attribute>
+        <attribute name="label" translatable="yes">Transition Pages</attribute>
         <attribute name="action">win.transition</attribute>
       </item>
     </section>
@@ -460,7 +460,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
         <property name="margin-bottom">10</property>
         <child>
           <object class="GtkStack" id="toplevel_stack">
-            <property name="transition-duration">1000</property>
+            <property name="transition-duration">250</property>
             <child>
               <object class="GtkStackPage">
                 <property name="name">page1</property>
@@ -1576,8 +1576,8 @@ microphone-sensitivity-medium-symbolic</property>
                                     <property name="orientation">vertical</property>
                                     <child>
                                       <object class="GtkStack" id="stack">
-                                        <property name="transition-type">crossfade</property>
-                                        <property name="transition-duration">1000</property>
+                                        <property name="transition-type">rotate-left-right</property>
+                                        <property name="transition-duration">250</property>
                                         <child>
                                           <object class="GtkStackPage">
                                             <property name="name">page1</property>